//nav
    var nav = $('.navbar');
    var navTexta = $('.navbar-default .navbar-nav>li>a');
    var language = $('.language');
    var langboxa = $('.langbox>a');
    var logoh3 = $('.navbar-default .navbar-brand>h3');
    function navFixed(){
    	if($(this).scrollTop() >= 50){
    		nav.addClass('fixed-nav');
    		navTexta.addClass('fixeda');
    		language.addClass('fixedlanguage');
    		langboxa.addClass('fixedlangboxa');
    		logoh3.eq(0).addClass('fixedh1');
    		logoh3.eq(1).addClass('fixedh2');
    	}else{
    		nav.removeClass('fixed-nav');
    		navTexta.removeClass('fixeda');
    		language.removeClass('fixedlanguage');
    		langboxa.removeClass('fixedlangboxa');
    		logoh3.eq(0).removeClass('fixedh1');
    		logoh3.eq(1).removeClass('fixedh2');
    	}
    };
    navFixed();
    $(window).scroll(function(event) {
      navFixed()
    });
// 
var language = $('.language');
  var langbox = $('.langbox');
  language.on('click',function(){
    langbox.toggleClass('langboxEvent');
  })
// 
var pagination = $('.pagination .pagination-text');//banner分页
  var mySwiper = new Swiper ('.banner-swiper-container', {
		autoplay: 5000,
	    loop: true,
	    onSlideChangeEnd:function(swiper){
	    	// 当前index
	    	var index = swiper.activeIndex
	    	if( index > $('.swiper-slide').length-2){
	    		index = index-($('.swiper-slide').length-2);
	    	}
	    	pagination.removeClass('hot').eq(index-1).addClass('hot');

	    }
	  })
  var paginationBox = $('.pagination-box');
  paginationBox.on('click',function(index,obj){
  	var index = $(this).index();
  	mySwiper.slideTo(index+1);
  })
// 项目动效
  var project = $('.project');
  project.on('click',function(){});
  project.hover(function() {
  	$(this).children('.project-text').finish().animate({'height':'100%'}, 200);
  }, function() {
  	$(this).children('.project-text').finish().animate({'height':'0'}, 200);
  });
  // 
    var project = new Swiper('.projects-swiper-container',{
    	// autoplay: 5000,
	    loop: true,
	    effect: 'flip',
      grabCursor: true,
      nextButton: '.swiper-button-next',
      prevButton: '.swiper-button-prev'
    })
  // 改变窗口大小
  // $(window).resize(function(event) {
  // 	var slidesPerViews = $(window).width()/500;
	 //  if(slidesPerViews<=1){
	 //  	slidesPerViews = 1;
	 //  }
	 //  founder.slidesPerView =slidesPerViews+1;
  // 		founder.updateContainerSize();
  // }); 
var founder = new Swiper('.founder', {});
// 移动端
 function detectmob() {  
    if( navigator.userAgent.match(/Android/i)  
    || navigator.userAgent.match(/webOS/i)  
    || navigator.userAgent.match(/iPhone/i)  
    || navigator.userAgent.match(/iPad/i)  
    || navigator.userAgent.match(/iPod/i)  
    || navigator.userAgent.match(/BlackBerry/i)  
    || navigator.userAgent.match(/Windows Phone/i)  
    ){  
        return true;  
    }  
    else {  
        return false;  
    }  
}  
if(detectmob()){
  var w = $(window).width();
  $('.banner').height(5*w/7);
};